import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/home.vue')
  },
  {
    path: '/message',
    name: 'Message',
    component: () => import('../views/message.vue')
  },
  {
    path: '/note',
    name: 'Note',
    component: () => import('../views/note.vue')
  },
  {
    path: '/user',
    name: 'User',
    component: () => import('../views/user.vue')
  },
  {
    path: '/homeitem/:id',
    name: 'Homeitem',
    component: () => import('../views/homeitem.vue')
  },
  {
    path: '/updatenote',
    name: 'Updatenote',
    component: () => import('../views/updatenote.vue')
  },
  {
    path: '/subject',
    name: 'Subject',
    component: () => import('../views/subject.vue')
  },
  {
    path: '/notecon',
    name: 'Notecon',
    component: () => import('../views/notecon.vue')
  },
  {
    path: '/updatenote',
    name: 'Updatenote',
    component: () => import('../views/updatenote.vue')
  },
  {
    path: '/',
    redirect:'/home'
  }
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
